

import java.util.*;
import java.io.*;

public class Magicks {
	
	
	public static void main(String args[]){
		try{
			Scanner sc = new Scanner(new File("****"));//ファイル名
			PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(new File("solve.in"))));
			int T = sc.nextInt();//T
			for(int i=1;i<=T;i++){//T回

				int C = sc.nextInt();
				for(int j=0;j<C;j++){
					
				}

				int D = sc.nextInt();
				for(int j=0;j<D;j++){
					
				}
				
				int N = sc.nextInt();
				String st = sc.next();
				
				
				
				
				
				pw.println("Case #"+i+": ");
			}
			pw.close();
		}catch(FileNotFoundException e){
			System.out.println(e);
		}catch(IOException e){
			System.out.println(e);			
		}
	}
	
}
